using System.Web.Mvc;
using System.Web.Mvc.Html;

namespace Cooking.Web.Helpers
{
    public static class HtmlHelperExtensions
    {
        public static string ActionLinkIf(this HtmlHelper helper, bool condition, string text, string actionName)
        {
            string html = string.Empty;
            
            if (condition)
            {
                html = helper.ActionLink(text, actionName);
            }

            return html;
        }

        public static string ActionLinkIf(this HtmlHelper helper, bool condition, string text, string actionName, object values)
        {
            string html = string.Empty;
            
            if (condition)
            {
                html = helper.ActionLink(text, actionName, values);
            }

            return html;
        }

        public static string LiteralIf(this HtmlHelper helper, bool condition, string literal)
        {
            string val = string.Empty;

            if (condition)
            {
                val = literal;
            }

            return val;
   
        }
    }
    



    
}